HTMLify
script.js
Views: 11 | Author: cody
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | let circularProgress = document.querySelector(".circular-progress"), progressValue = document.querySelector(".progress-value"); let progressStartValue = 0, progressEndValue = 90, speed = 100; let progress = setInterval(() => { progressStartValue++; progressValue.textContent = `${progressStartValue}%` circularProgress.style.background = `conic-gradient(#7d2ae8 ${progressStartValue * 3.6}deg, #ededed 0deg)` if(progressStartValue == progressEndValue){ clearInterval(progress); } }, speed); |